[colors]
background = ${xrdb:color0:#222}
background-alt = ${xrdb:color7:#222}
foreground = ${xrdb:color7:#222}
primary = ${xrdb:color1:#222}
secondary = ${xrdb:color2:#222}
alert = ${xrdb:color3:#222}
color1 = ${xrdb:color1}
color2 = ${xrdb:color2} 
color3 = ${xrdb:color3}
color4 = ${xrdb:color4}
color5 = ${xrdb:color5}
color6 = ${xrdb:color6}
color8 = ${xrdb:color8} 

[bar/mybar]
monitor = ${env:MONITOR:HDMI-0}
override-redirect = false 
bottom = false
background = ${colors.background}
foreground = ${colors.foreground}
fixed-center = true
width = 70%
height = 28
radius = 1.0
line-color = #f00
offset-y = 6
offset-x = 200
line-size = 3
spacing = 0
padding = 0

font-0 = scientifica:style=Regular:pixelsize=8;2
font-1 = "Font Awesome 5 Brands Regular:size=9;3"
font-2 = "Font Awesome 5 Free Solid:size=7;1"
font-3 = "Font Awesome 5 Free Regular:size=8;3"

modules-right = network cpu alsa memory date powermenu
modules-center =
modules-left =  bspwm
; Position of the system tray window
tray-position = left
tray-maxsize = 12
tray-background = ${colors.background}
tray-offset-x = 0
tray-offset-y = 0
; Pad the sides of each tray icon
tray-padding = 2

[module/bspwm]
type = internal/bspwm
format = <label-state> <label-mode>

label-empty-foreground = ${colors.color8}
label-focused-background = ${colors.color1} 
label-focused = %name%
label-focused-padding =2
label-occupied = %name%
label-occupied-padding = 2
label-occupied-foreground = ${colors.color4}
label-empty = %name%
label-empty-padding = 2

label-monocle = M 
label-tiled = T
label-floating = F
label-pseudotiled = P

[settings]
label-focused-underline= ${colors.background}
throttle-output = 5
throttle-output-for = 10
;throttle-input-for = 30
screenchange-reload = true
pseudo-transparency = true

[module/date]
type = internal/date
time = %H:%M
format = TIME <label>
#format-background = #55ff3399
format-foreground = ${colors.color1} 
format-padding = 2
label = %time%
label-foreground = ${colors.foreground} 

[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98

format-charging = BAT <label-charging>
format-discharging = BAT <label-discharging>
format-full = BAT <label-full>
label-charging = %percentage%%
label-discharging = %percentage%%

label-charging-foreground = ${colors.foreground}
label-discharging-foreground = ${colors.foreground}
label-full-foreground = ${colors.foreground}

format-charging-foreground = ${colors.color2}
format-discharging-foreground = ${colors.color2}
format-full-foreground = ${colors.color2}

format-charging-padding = 1
format-discharging-padding = 1 
format-full-padding = 1

[module/network]
type = internal/network
interface = enp5s0
interval = 3.0
unknown-as-up = true
accumulate-stats = true

format-connected = NET <label-connected>
label-connected = %downspeed%
format-connected-padding = 1
format-connected-foreground = ${colors.color4}
label-connected-foreground = ${colors.foreground}

[module/alsa]
type = internal/alsa

format-volume = VOL <label-volume>
label-muted = muted
label-muted-padding = 2
label-volume-foreground = ${colors.foreground}
format-volume-foreground = ${colors.color5}
format-volume-padding = 2

[module/backlight]
type = internal/backlight

card = intel_backlight
enable-scroll = true

format = BL <label>
format-padding = 1
format-foreground = ${colors.color6}
label-foreground = ${colors.foreground}
label = %percentage%%

[module/cpu]
type = internal/cpu

format = CPU <label>
format-foreground = ${colors.color3}
format-padding = 2
label = %percentage%%
label-foreground = ${colors.foreground}

[module/memory]
type = internal/memory
interval = 1
format = MEM <label>
format-foreground = ${colors.color3}
format-padding = 2
label = %percentage_used%%
label-foreground = ${colors.foreground}

[module/powermenu]
type = custom/text
content = 
content-foreground = ${colors.color3}
content-background = ${colors.background}
content-padding = 1
click-left = ~/.config/polybar/scripts/powermenu 
click-right = ~/.config/polybar/scripts/powermenu 

